function http(param){
  return new Promise(function(resolve, reject){
    $.ajax({
      url: param.url,
      type: param.type || 'get',
      data: param.data || '',
      success: function(data){
        resolve(data);
      },
      error: function(error){
        reject(error)
      }
    });
  });
};
